package com.xike.microsysserver.entity;

import com.alibaba.fastjson.annotation.JSONField;
import lombok.Builder;
import lombok.Data;
import lombok.experimental.Tolerate;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * Auther: wuson  <br/>
 * Date: 2021/4/15:16:21  <br/>
 * Description:
 */
@Data
@Builder
public class CouponEntity {
    //id
    private int id;
    //类型
    private String type;
    //满减底线
    private int condition;
    //面值
    private int value;
    //创建时间
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
//    @JsonFormat(shape= JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss")
    private Date createTime;
    //过期时间
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
//    @JsonFormat(shape= JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss")
    private Date expirationTime;
    //状态
    private int status;
    @Tolerate
    public  CouponEntity(){}
}
